package cn.itlaobing.Dao;

import cn.itlaobing.Model.UserModel;
import org.apache.commons.dbutils.ResultSetHandler;

import java.sql.ResultSet;
import java.sql.SQLException;

public class ResultHandle implements ResultSetHandler<UserModel>{
    public UserModel handle(ResultSet resultSet) throws SQLException {
        UserModel um=new UserModel();
        if(resultSet.next()){
            um.setAccount(resultSet.getString("counts"));
            um.setPassowrd(resultSet.getString("pwd"));
            return um;
        }
        return null;
    }
}
